﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dpdw.Behaviour.IteratorPattern
{
    public class DinerMenu
    {
        private const int MAX_ITEMS = 6;
        private int numberOfItems = 0;
        private MenuItem[] menuItems;

        public DinerMenu()
        {
            menuItems = new MenuItem[MAX_ITEMS];

            for (int i = 0; i < MAX_ITEMS; i++)
            {
                menuItems[i] = 
                    new MenuItem() { Name = DateTime.Now.ToString("yyyyMMddHHmmssff") };
            }
        }

        public Iterator CreateIterator()
        {
            return new DinerMenuIterator(menuItems);
        }
    }
}
